<template>
  <div class="member-home">
    <!-- 概览 -->
    <HomeOverview />
    <!-- 收藏 -->
    <HomePanel title="我的收藏">
      <GoodsItem v-for="item in collectGoods" :key="item.id" :goods="item" />
    </HomePanel>
    <!-- 足迹 -->
    <HomePanel title="我的足迹">
      <GoodsItem v-for="item in goods" :key="item.id" :goods="item" />
    </HomePanel>
    <!-- 猜你 -->
    <GoodsRelevant />
  </div>
</template>
<script setup >
import HomeOverview from './cpns/home-overview'
import HomePanel from './cpns/home-panel'
import GoodsRelevant from '@/views/goods/cpns/goods-relevant'
import GoodsItem from '@/views/category/cpns/goods-item'
import Member from '@/api/modules/member'
import { ref } from 'vue'

const goods = ref([])

Member.findFootprint({
  page: 1,
  pageSize: 4
}).then(data => {
  goods.value = data.result.items
  console.log(goods.value);
})

// 调用模拟的接口
const collectGoods = ref([])
Member.findCollect({
  page: 1,
  pageSize: 4
}).then(data => {
  collectGoods.value = data.result.items
})



</script>
<style scoped lang="less">
:deep(.xtx-carousel) .carousel-btn.prev {
  left: 5px;
}

:deep(.xtx-carousel) .carousel-btn.next {
  right: 5px;
}
</style>
